home *** CD-ROM | disk | FTP | other *** search
- /*
- File: ControlStrip.h (Received by DTS: 6/7/94)
-
- Contains: header file describing the interface between the Control Strip and its modules
-
- Copyright: © 1992-1994 by Apple Computer, Inc. All rights reserved.
- */
-
-
- #ifndef __CONTROLSTRIP__
- #define __CONTROLSTRIP__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifndef __MENUS__
- #include <Menus.h>
- #endif
-
- #ifndef __DIALOGS__
- #include <Dialogs.h>
- #endif
-
-
- /*********************************************************************************************
-
- messages passed to the modules
-
- *********************************************************************************************/
-
- #define sdevInitModule 0 // initialize the module
- #define sdevCloseModule 1 // clean up before being closed
- #define sdevFeatures 2 // return feature bits
- #define sdevGetDisplayWidth 3 // returns the width of the module's display
- #define sdevPeriodicTickle 4 // periodic tickle when nothing else is happening
- #define sdevDrawStatus 5 // update the interface in the Control Strip
- #define sdevMouseClick 6 // user clicked on the module's display area in the Control Strip
- #define sdevSaveSettings 7 // saved any changed settings in module's preferences file
- #define sdevShowBalloonHelp 8 // puts up a help balloon, if the module has one to display
-
-
- /*********************************************************************************************
-
- Features supported by the module. If a bit is set, it means that feature is supported.
- All undefined bits are reserved for future use by Apple, and should be set to zero.
-
- *********************************************************************************************/
-
- #define sdevWantMouseClicks 0 // notify the module of mouseDown events
- #define sdevDontAutoTrack 1 // call the module to do mouse tracking
- #define sdevHasCustomHelp 2 // module provides its own help messages
- #define sdevKeepModuleLocked 3 // module needs to be locked in the heap
-
-
- /*********************************************************************************************
-
- Result values returned by the sdevPeriodicTickle and sdevIconMouseClick selectors.
- If a bit is set, the module can request that a specific function is performed by
- the Control Strip. A result of zero will do nothing. All undefined bits are reserved
- for future use by Apple, and should be set to zero.
-
- *********************************************************************************************/
-
- #define sdevResizeDisplay 0 // resize the module's display
- #define sdevNeedToSave 1 // need to save changed settings, when convenient
- #define sdevHelpStateChange 2 // need to update the help message because of a state change
- #define sdevCloseNow 3 // close a module because it doesn't want to stay around
-
-
- /*********************************************************************************************
-
- Gestalt
-
- *********************************************************************************************/
-
- #define gestaltControlStripAttr 'sdev' // Control Strip attributes
- #define gestaltControlStripExists 0
- #define gestaltControlStripVersionFixed 1
-
-
- #define gestaltControlStripVersion 'csvr' // Control Strip version
-
-
- /*********************************************************************************************
-
- miscellaneous
-
- *********************************************************************************************/
-
- #define sdevFileType 'sdev' // module's file type
-
- #define sdevMenuItemMark '•' // ‘checkmark’ to use in popup menus
-
-
- // direction values for SBDrawBarGraph
-
- #define BarGraphSlopeLeft -1 // max end of sloping bar graph is on the left
- #define BarGraphFlatRight 0 // max end of flat bar graph is on the right
- #define BarGraphSlopeRight 1 // max end of sloping bar graph is on the right
-
-
- /*********************************************************************************************
-
- utility routines to provide standard interface elements and support for common functions
-
- *********************************************************************************************/
-
- pascal Boolean SBIsControlStripVisible()
- = {0x7000,0xAAF2};
-
- pascal void SBShowHideControlStrip(Boolean showIt)
- = {0x303C,0x0101,0xAAF2};
-
- pascal Boolean SBSafeToAccessStartupDisk()
- = {0x7002,0xAAF2};
-
- pascal short SBOpenModuleResourceFile(OSType fileCreator)
- = {0x303C,0x0203,0xAAF2};
-
- pascal OSErr SBLoadPreferences(ConstStr255Param prefsResourceName, Handle *preferences)
- = {0x303C,0x0404,0xAAF2};
-
- pascal OSErr SBSavePreferences(ConstStr255Param prefsResourceName, Handle preferences)
- = {0x303C,0x0405,0xAAF2};
-
- pascal void SBGetDetachedIndString(StringPtr theString, Handle stringList, short whichString)
- = {0x303C,0x0506,0xAAF2};
-
- pascal OSErr SBGetDetachIconSuite(Handle *theIconSuite, short theResID, unsigned long selector)
- = {0x303C,0x0507,0xAAF2};
-
- pascal OSErr SBTrackPopupMenu(const Rect *moduleRect, MenuHandle theMenu)
- = {0x303C,0x0408,0xAAF2};
-
- pascal OSErr SBTrackSlider(const Rect *moduleRect, short ticksOnSlider, short initialValue)
- = {0x303C,0x0409,0xAAF2};
-
- pascal OSErr SBShowHelpString(const Rect *moduleRect, StringPtr helpString)
- = {0x303C,0x040A,0xAAF2};
-
- pascal short SBGetBarGraphWidth(short barCount)
- = {0x303C,0x010B,0xAAF2};
-
- pascal void SBDrawBarGraph(short level, short barCount, short direction, Point barGraphTopLeft)
- = {0x303C,0x050C,0xAAF2};
-
- pascal void SBModalDialogInContext(ModalFilterProcPtr filterProc, short *itemHit)
- = {0x303C,0x040D,0xAAF2};
-
-
- #endif
-